Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quicklinks #2715

Merged
merged 4 commits into from
Apr 7, 2022
Merged

Quicklinks #2715

merged 4 commits into from
Apr 7, 2022

Conversation

kobergj
Copy link
Contributor

@kobergj kobergj commented Apr 5, 2022

Introduces quicklinks.

Creating a Link with the flag "quicklink=true" will create a Quicklink. If another create link request with "quicklink=true" comes in, the server will return the existing link instead of creating a new one.

  • Since that functionality is not part of the cs3api we needed to update it.
  • Besides "true" usual go convertible string values are supported for the quicklink flag: 1, t, T, TRUE, true, True see https://golang.google.cn/pkg/strconv/#ParseBool

Curl example:

curl --insecure -X POST "https://localhost:9200/ocs/v1.php/apps/files_sharing/api/v1/shares" -u admin:admin -d 'shareType=3&path=/rhino.png&permissions=15&name=BLUBB&quicklink=true'

<?xml version="1.0" encoding="UTF-8"?>
<ocs>
  <meta>
    <status>ok</status>
    <statuscode>100</statuscode>
    <message>OK</message>
  </meta>
  <data>
    <id>exmHTRXGQCwSOyL</id>
    <share_type>3</share_type>
    <uid_owner>admin</uid_owner>
    <displayname_owner>Admin</displayname_owner>
    <additional_info_owner>admin@example.org</additional_info_owner>
    <permissions>3</permissions>
    <stime>1649167505</stime>
    <parent/>
    <expiration/>
    <token>avEAzCCwPcfNuer</token>
    <uid_file_owner>admin</uid_file_owner>
    <displayname_file_owner>Admin</displayname_file_owner>
    <additional_info_file_owner>admin@example.org</additional_info_file_owner>
    <state>0</state>
    <path>/rhino.png</path>
    <item_type>file</item_type>
    <mimetype>image/png</mimetype>
    <storage_id>shared::/rhino.png</storage_id>
    <storage>0</storage>
    <item_source>ddc2004c-0977-11eb-9d3f-a793888cd0f8!db6f0bc2-dc85-4b5e-9834-621dd76d1e68</item_source>
    <file_source>ddc2004c-0977-11eb-9d3f-a793888cd0f8!db6f0bc2-dc85-4b5e-9834-621dd76d1e68</file_source>
    <file_parent/>
    <file_target>/rhino.png</file_target>
    <share_with_additional_info/>
    <mail_send>0</mail_send>
    <name>BLUBB</name>
    <url>https://localhost:9200/s/avEAzCCwPcfNuer</url>
    <quicklink>true</quicklink>
  </data>
</ocs>

Signed-off-by: jkoberg <jkoberg@owncloud.com>
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@kobergj kobergj requested review from a team, labkode, ishank011 and glpatcern as code owners April 5, 2022 14:26
@kobergj kobergj requested review from C0rby, micbar, rhafer and wkloucek and removed request for labkode, glpatcern and ishank011 April 5, 2022 14:37
Signed-off-by: jkoberg <jkoberg@owncloud.com>
@kobergj kobergj requested a review from C0rby April 6, 2022 07:59
@kobergj kobergj force-pushed the Quicklinks branch 2 times, most recently from f47cc99 to bfc12f7 Compare April 6, 2022 14:20
Signed-off-by: jkoberg <jkoberg@owncloud.com>
Copy link
Contributor

@C0rby C0rby left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants